package com.ahs;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.client.ServiceInstance;
import org.springframework.cloud.client.discovery.DiscoveryClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
public class ControllerEureka {
	@Autowired
	private DiscoveryClient dc;
	
	@GetMapping("/user-info")
	public List<ServiceInstance> showInfo(){
		List<ServiceInstance> service = dc.getInstances("ahs-eureka-29202");
		return service;
	}
	
}
